Actions have some number of required parameters. The parameters each have a data type. For example, the SpriteSetVisible action has a single Boolean parameter which makes the sprite visible if set to true , and invisible if set to false .
Parameters with numeric data types may optionally be specified by an expression. The SpriteSetVisible action, for example, could have an expression which evaluates to true if the movie is playing and false if it is stopped.
Options which modify a parameter's value may be specified for some parameters. Each action defines which options are allowed for its parameters. Parameters which allow options to be specified are typically associated with a property of the action's target. The current value of this property is used in conjunction with the parameter's value and options to determine the new value.
The kActionFlagActionIsDelta constant takes the current property value and adds the parameter's value to it. This value is pinned to the minimum and maximum values. The kActionFlagParameterWrapsAround constant causes the value to wrap within the range defined by the minimum and maximum value. If the new value is greater than the maximum value, it wraps around to the minimum, plus the difference between the new and the maximum value.
Parameters all have default minimum and maximum values. When using the delta, or delta with wraparound options, the minimum and maximum value options further limit this range.
The kActionFlagActionIsToggle constant is used with properties that only have two possible values, such as a visible property which may be either true or false . Using it repeatedly on a sprite's visible property, for example, will toggle it between visible and invisible. The actual value of the parameter is ignored when using the toggle. For more information about these options, see "Action Parameter Constants" (page 125) .
Named time parameters use the indexed chapter text tracks to obtain time values from the names.
| Previous | Chapter Contents | Chapter Top | Next |